//
// Created by 28365 on 2025/3/4.
//

#ifndef ODUPDATERSDK_UPDATESTARTEVENT_H
#define ODUPDATERSDK_UPDATESTARTEVENT_H

#include <map>
#include <list>
#include "../include/obj/Res.h"

using namespace std;

class UpdateStartEvent {

private:
    //需要更新的内容
    //按版本顺序从小到大排序
    const map<int, list<Res>,less<>> *needUpdate;
    //是否更新
    bool cancel = false;
public:

    explicit UpdateStartEvent(const map<int, list<Res>,less<>> *needUpdate);

    [[nodiscard]] const map<int, list<Res>,less<>> *getNeedUpdate() const;

    [[nodiscard]] bool isCancel() const;

    /**
     * @param cancel 设为true以取消更新
     */
    void setCancel(bool cancel);
};


#endif //ODUPDATERSDK_UPDATESTARTEVENT_H
